 <?php 
		$arrCount = $this->arrCount;
		$baseUrl = Efy_Init_Config::_getCurrentHttpAndHost();
		$arrScheduleToday = $this->arrScheduleToday;
		$v_day_staff = $this->v_day_staff;
		$arryDayStaff = explode('!~~!', $v_day_staff);
		$arrHightlight = $this->arrHightlight;
		$arrResul = $this->arrResul;
		$arrMenuHome = $this->arrMenuHome;
		//var_dump($arrMenuHome);
?>
<form action="index" method="POST" id="frmRecord">	
	<?php echo $this->formHidden("hdn_object_id","",null); ?>
	<?php echo $this->formHidden("hdn_current_page",$this->currentPage,null); ?>
	<?php echo $this->formHidden("hdn_record_number_page",$this->numRowOnPage,null); ?>
	<?php echo $this->formHidden("hdn_filter_xml_tag_list",$this->filterXmlTagList,null); ?>
	<?php echo $this->formHidden("hdn_filter_xml_value_list",$this->filterXmlValueList,null); ?>
	<!-- Tin noi bo -->
 	<table class='Table_index_home' cellpadding="0" cellspacing="0">	 
		<tr style=" background-image:url(<?= $this->baseUrl?>images/drop_content2.gif); background-repeat: repeat-x; background-position:bottom;"> 
            <td height="9px" width="36" style=" background-image:url(<?= $this->baseUrl?>images/drop1.gif); background-repeat:no-repeat; background-position:left"> </td>
        </tr>
        <tr><td height="30px"  width="50%" style=" background-image:url(<?= $this->baseUrl?>images/nen_content_top1.png); background-repeat: repeat-x; background-position:top;border:1px #a9837b solid;font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#d10000; font-size:12px; border-top:none; border-bottom:none; padding-top:20px; padding-left:10px;text-transform:uppercase; "><?=$arrMenuHome[0]['C_NAME']?></td></tr>
		<tr style="border:1px #a9837b solid; border-top:none; border-bottom:none;padding-left:20px; padding-right:5px;">						
			<td id="td1" style="border:1px #a9837b solid; border-top:none; border-bottom:none; background-image:url(<?= $this->baseUrl?>images/nen_content2.png); background-repeat:repeat-y; background-position:top; padding-right:" valign="top" width="50%" >				
			    <table cellpadding="0" cellspacing="0" border="0" width="98%" >
					<?php
			        //Chuyen muc dau tien hien thi len trang chu
			        $urlReleft = $baseUrl .'web/home/getarticle/?menuid='.$arrMenuHome[0][PK_WEB_MENU].'&parent_menuid='.$arrMenuHome[0][FK_WEB_MENU].'&articleid='.$arrMenuHome[0][FK_WEB_ARTICLE].'&sleftmenu='.$arrMenuHome[0]['C_VISIT_LEFT'].'&sliid='.$arrMenuHome[0]['C_VISIT_TOP'].'&menuname='.$arrMenuHome[0]['C_NAME'];
			        $iOpenNewWinleft = 0;
					if($arrMenuHome[0][C_WINDOWS_OPEN]=='1'){
						$iOpenNewWinleft = 3;
					}
					$urlReleft = "javaScript:goto_url('".$urlReleft."',".$iOpenNewWinleft.")";	
					$check_one = 0; 
					$saddurlvisit = '?sliid='.$arrMenuHome[0]['C_VISIT_TOP'].'&sleftmenu='.$arrMenuHome[0]['C_VISIT_LEFT'];
					for($i = 0;$i < sizeof($arrResul);$i++){
						$sgotoArticle = "javascript:item_onclick('".$arrResul[$i]['PK_WEB_ARTICLE']."','../viewarticle/".$saddurlvisit."');";
						if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[0]['PK_WEB_MENU'])&&($check_one !=0 )){
							$linkImg = $this->baseUrl.'images/nut_before_article.gif';
							?>
					<tr  style="border:1px #a9837b solid; border-top:none; border-bottom:none;padding-left:20px; padding-right:5px;">
						<td class="link_article_row" valign="top"  colspan="2"  style="padding-left:20px; padding-right:5px; ">									
							<a  href="<?=$sgotoArticle?>"><?=$arrResul[$i]['C_TITLE']?></a>
						</td>
					</tr>
                <?php 	} if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[0]['PK_WEB_MENU'])&&($check_one == 0)){
							$check_one = 1; 	?>	
					<tr >																
				<?php $sImageName = $arrResul[$i]['C_IMAGE_NAME']; 
					  $sImageUrl = '';
					  if($sImageName != ''){
						// Tach ten file ra
						if(strpos($sImageName,"!~!") == 0){
							$file_name = $sImageName;
						}else{
							$arrFilename = explode('!~!',$sImageName);					
							$file_name = $arrFilename[1];
							$file_id   = explode("_", $arrFilename[0]);
						} 
						$sImageUrl = $this->baseUrl.'attach-file/article/image-upload/'. $file_id[0] . "/" . $file_id[1] . "/" . $file_id[2] . "/" . $sImageName;
					 }	
				?>
							<td class="content_article" valign="top" style=" padding-left:15px; padding-right:5px; ">
							 <?php if($sImageUrl!=''){ ?>	
                                  <div style='height:100px; width:140px; float:left; margin-right:5px;margin-bottom:10px;'>
                              		<img style="border: solid 2px #CCCCCC; " align="left"  src="<?=$sImageUrl?>" onclick = "<?=$sgotoArticle?>" onload="javaScript:resizeImageWithoutLink(130,100, this)" />
									<?php if($arrResul[$i]['C_IMAGE_TITLE']){ ?>		
                                        <div style="height:auto;text-align:justify;margin-top:3px;"><span style="font-family:Tahoma; font-size:10px;"><?=$arrResul[$i]['C_IMAGE_TITLE']?></span></div>											
									<?php } ?>
                                  </div>					   
							<?php } ?>			   
                                  <div>
									<p class="title_article"   ><a  href="<?=$sgotoArticle?>"><?=$arrResul[$i]['C_TITLE']?></a></p>				
									<p class="short_content_article" style='margin-top:-5px;'><span ><?=$arrResul[$i]['C_SHORT_CONTENT']?></span></p>
                                  </div>                                         
                             </td>
						</tr><?php }
                }?>			
			    </table>
		    </td>
		</tr>
        <tr style=" background-image:url(<?= $this->baseUrl?>images/nen_content.png); background-repeat: repeat-x; background-position:center;border:1px #a9837b solid; border-top:none;">				
            <td  height="30px"  width="98%" style=" font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#d10000; font-size:12px;border:1px #a9837b solid;border-top:none;  " ></td>
		</tr>		
	</table>
	<table class='Table_index_home' cellpadding="0" cellspacing="0" >
        <tr>
        	 <td colspan="3" height="3px"> 		        
         	</td>
        </tr>  		
		<?php 
		//var_dump($arrMenuHome);
		//echo $this->countMenu;
		for($index = 1;$index <= ($this->countMenu);$index++){
		$ileft = ($index * 2)-1;
		$iright = $ileft + 1;
		$urlReleft = $baseUrl .'web/home/getarticle/?menuid='.$arrMenuHome[$ileft][PK_WEB_MENU].'&parent_menuid='.$arrMenuHome[$ileft][FK_WEB_MENU].'&articleid='.$arrMenuHome[$ileft][FK_WEB_ARTICLE].'&sleftmenu='.$arrMenuHome[$ileft]['C_VISIT_LEFT'].'&sliid='.$arrMenuHome[$ileft]['C_VISIT_TOP'].'&menuname='.$arrMenuHome[$ileft]['C_NAME'];
		$urlReright = $baseUrl .'web/home/getarticle/?menuid='.$arrMenuHome[$iright][PK_WEB_MENU].'&parent_menuid='.$arrMenuHome[$iright][FK_WEB_MENU].'&articleid='.$arrMenuHome[$iright][FK_WEB_ARTICLE].'&sleftmenu='.$arrMenuHome[$iright]['C_VISIT_LEFT'].'&sliid='.$arrMenuHome[$iright]['C_VISIT_TOP'].'&menuname='.$arrMenuHome[$iright]['C_NAME'];
		$iOpenNewWinleft = 0;
		if($arrMenuHome[$ileft][C_WINDOWS_OPEN]=='1'){
			$iOpenNewWinleft = 3;
		}
		$urlReleft = "javaScript:goto_url('".$urlReleft."',".$iOpenNewWinleft.")";	
		
		$iOpenNewWinright = 0;
		if($arrMenuHome[$iright][C_WINDOWS_OPEN]=='1'){
			$iOpenNewWinright = 3;
		}
		$urlReright = "javaScript:goto_url('".$urlReright."',".$iOpenNewWinright.")";	
		?>
        <tr>
        	 <td colspan="3" height="3px"> 		        
         	</td>
        </tr>                              
      	<tr >				                  		
	       	<td  height="30px"  width="50%" style=" background-image:url(<?= $this->baseUrl?>images/nen_content_top1.png); background-repeat: repeat-x; background-position:top;border:1px #a9837b solid;font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#d10000; font-size:12px; border-top:none; border-bottom:none; padding-top:20px; padding-left:10px;text-transform:uppercase; "  >
				<span style=" margin-top:15px"><?=$arrMenuHome[$ileft]['C_NAME']?></span></td>
	       		<td width="1px">&nbsp; </td>   
	     	<td height="30px"  width="50%" style=" background-image:url(<?= $this->baseUrl?>images/nen_content_top1.png); background-repeat: repeat-x; background-position:top;border:1px #a9837b solid;font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#d10000; font-size:12px; border-top:none; border-bottom:none; padding-top:20px; padding-left:10px;text-transform:uppercase; "><?=$arrMenuHome[$iright]['C_NAME']?></td>                    
		</tr>
		<tr style="border:1px #a9837b solid; border-top:none; border-bottom:none;padding-left:20px; padding-right:5px;">				
			<td id="td1" valign="top"  width="50%"  style="border:1px #a9837b solid; border-top:none; border-bottom:none; background-image:url(<?= $this->baseUrl?>images/nen_content2.png); background-repeat:repeat-y; background-position:top" >
              <table cellpadding="0" cellspacing="0" width="98%"  >      
						<?php
						if($arrMenuHome[$ileft]['PK_WEB_MENU']!=''){
							$check_one = 0; 
							$saddurlvisit = '?sliid='.$arrMenuHome[$ileft]['C_VISIT_TOP'].'&sleftmenu='.$arrMenuHome[$ileft]['C_VISIT_LEFT'];
							for($i = 0;$i < sizeof($arrResul);$i++){
								$sgotoArticle = "javascript:item_onclick('".$arrResul[$i]['PK_WEB_ARTICLE']."','../viewarticle/".$saddurlvisit."');";
								if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[$ileft]['PK_WEB_MENU'])&&($check_one !=0 )){
								$linkImg = $this->baseUrl.'images/nut_before_article.gif';
							?>
                            
                           
									<tr  style="border:1px #a9837b solid; border-top:none; border-bottom:none;padding-left:20px; padding-right:5px;">
										
										<td class="link_article_row" valign="top"  style="padding-left:20px; padding-right:5px;" >									
										  <a  href="<?=$sgotoArticle?>">
									      <?=$arrResul[$i]['C_TITLE']?>
										  </a>
									  </td>
									</tr>
							<?php 
								}	
								if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[$ileft]['PK_WEB_MENU'])&&($check_one == 0)){
									$check_one = 1; 
							?>
									<tr >
																		
										<?php
											$sImageName = $arrResul[$i]['C_IMAGE_NAME']; 
											$sImageUrl = '';
											if($sImageName != ''){
												// Tach ten file ra
												if(strpos($sImageName,"!~!") == 0){
													$file_name = $sImageName;
												}else{
													$arrFilename = explode('!~!',$sImageName);					
													$file_name = $arrFilename[1];
													$file_id   = explode("_", $arrFilename[0]);
												} 
												$sImageUrl = $this->baseUrl.'attach-file/article/image-upload/'. $file_id[0] . "/" . $file_id[1] . "/" . $file_id[2] . "/" . $sImageName;
											}	
											?>
												<td class="content_article" valign="top" style=" padding-left:15px; padding-right:5px; ">
												
												 <?php if($sImageUrl!=''){ ?>	
                                                <?php if($arrResul[$i]['C_IMAGE_TITLE']){ ?>
                                                
                                                <?php }else{ ?>
                                                 
                                                <?php } ?>
                                                   <div style='height:100px; width:140px; float:left; margin-right:5px;margin-bottom:10px;'>
                                    				 <img style="border: solid 2px #CCCCCC; " align="left"  src="<?=$sImageUrl?>" onclick = "<?=$sgotoArticle?>" onload="javaScript:resizeImageWithoutLink(130,100, this)" />
                                    				 
                                                      
													  <?php if($arrResul[$i]['C_IMAGE_TITLE']){ ?>		
                                                       <div style="height:auto;text-align:justify;margin-top:3px;">												
										      				<span style="font-family:Tahoma; font-size:10px;">
														  <?=$arrResul[$i]['C_IMAGE_TITLE']?>
														</span>                                                      </div>											
													<?php } ?>
                                                 </div>	
												   
											      <?php } ?>
												   
                                                <div>
											      <p class="title_article"   ><a  href="<?=$sgotoArticle?>"><?=$arrResul[$i]['C_TITLE']?></a></p>				
												  <p class="short_content_article" style='margin-top:-5px;'>
                                                  	<span >  <?=$arrResul[$i]['C_SHORT_CONTENT']?>	 </span>                                                  </p>
                                                 </div>                                         </td>
									</tr>
                               
							<?php
								}
							}
						}
						?>	
                 </table>  
          	</td>            
			<td style=" width:1px;">&nbsp; </td>
			<td id="td1" style="border:1px #a9837b solid; border-top:none; border-bottom:none; background-image:url(<?= $this->baseUrl?>images/nen_content2.png); background-repeat:repeat-y; background-position:top; padding-right:" valign="top" width="50%" >				
          		<table cellpadding="0" cellspacing="0" border="0" width="98%" >
		      		<?php
						if($arrMenuHome[$iright]['PK_WEB_MENU']!=''){
							$check_one = 0; 
							$saddurlvisit = '?sliid='.$arrMenuHome[$iright]['C_VISIT_TOP'].'&sleftmenu='.$arrMenuHome[$iright]['C_VISIT_LEFT'];
							for($i = 0;$i < sizeof($arrResul);$i++){
								$sgotoArticle = "javascript:item_onclick('".$arrResul[$i]['PK_WEB_ARTICLE']."','../viewarticle/".$saddurlvisit."');";
								if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[$iright]['PK_WEB_MENU'])&&($check_one !=0 )){
								$linkImg = $this->baseUrl.'images/nut_before_article.gif';
							?>
					<tr  style="border:1px #a9837b solid; border-top:none; border-bottom:none;padding-left:20px; padding-right:5px;">
										
										<td class="link_article_row" valign="top"  colspan="2"  style="padding-left:20px; padding-right:5px; ">									
										<a  href="<?=$sgotoArticle?>"><?=$arrResul[$i]['C_TITLE']?></a>                                        </td>
					</tr>
                                <?php 
								}	
								if(($arrResul[$i]['FK_WEB_MENU']==$arrMenuHome[$iright]['PK_WEB_MENU'])&&($check_one == 0)){
									$check_one = 1; 
							?>
									<tr>
									
									<?php
										$sImageName = $arrResul[$i]['C_IMAGE_NAME']; 
										$sImageUrl = '';
										if($sImageName != ''){
											// Tach ten file ra
											if(strpos($sImageName,"!~!") == 0){
												$file_name = $sImageName;
											}else{
												$arrFilename = explode('!~!',$sImageName);					
												$file_name = $arrFilename[1];
												$file_id   = explode("_", $arrFilename[0]);
											} 
											$sImageUrl = $this->baseUrl.'attach-file/article/image-upload/'. $file_id[0] . "/" . $file_id[1] . "/" . $file_id[2] . "/" . $sImageName;
										}		
										?>
									<td class="content_article" valign="top"  style=" padding-left:15px; padding-right:5px; " >
									<?php if($sImageUrl!=''){ ?>	
									<?php if($arrResul[$i]['C_IMAGE_TITLE']){ ?>
									
									<?php }else{ ?>
									 
									<?php } ?>
                                     <div style='height:100px; width:140px; float:left;  margin-right:5px; margin-bottom:10px;'>
                                             
                                             <img style="border: solid 2px #CCCCCC;" align="left"  src="<?=$sImageUrl?>" onclick = "<?=$sgotoArticle?>" onload="javaScript:resizeImageWithoutLink(130,100, this)" />
                                               <?php if($arrResul[$i]['C_IMAGE_TITLE']){ ?>														
                                                    <div style="height:auto;text-align:justify;margin-top:3px;">
                                                          <span style="font-family:Tahoma; font-size:10px; margin-right:2px; "><?=$arrResul[$i]['C_IMAGE_TITLE']?>	</span> 
                                                          
                                                          
                                		  </div>											
                                                <?php } ?>
    						 	    </div>
												
												<?php } ?>
										<div>
                                                <p class="title_article" ><a  href="<?=$sgotoArticle?>"><?=$arrResul[$i]['C_TITLE']?></a></p>				
                                                <p class="short_content_article" style='margin-top:-5px;'>
                                                        <span class="short_content_article" style="margin-top:-5px;">
                                                          <?=$arrResul[$i]['C_SHORT_CONTENT']?>
                                                        </span>                                                </p>
                                       </div>                                     </td>										
							</tr>
                            
                          
					<?php } } } ?>	  
               </table>      
          	</td>																	
          </tr>
          <tr >				    			
            <td  height="30px"  width="50" style=" background-image:url(<?= $this->baseUrl?>images/nen_content.png); background-repeat: repeat-x; background-position:bottom;border:1px #a9837b solid; border-top:none;" >
            </td>
            <td width="1px"></td>
           	<td  height="30px"  width="50" style=" background-image:url(<?= $this->baseUrl?>images/nen_content.png); background-repeat: repeat-x; background-position:bottom;border:1px #a9837b solid; border-top:none;" >
            </td>                    
         </tr> 
		<?php }?>
	</table>
    <!-- het-->
</form>

